package CustomComponents
{
	import spark.preloaders.SplashScreen;
	
	 import mx.core.DPIClassification; 
	 import mx.core.mx_internal; use namespace mx_internal; 
	 public class MultiDPISplashScreen extends SplashScreen 
	{ 
		 [Embed(source="assets/splash160.jpg")] 
		 private var SplashImage160:Class; 
		 
		 [Embed(source="assets/splash240.jpg")] 
		 private var SplashImage240:Class; 
		 
		 [Embed(source="assets/splash320.jpg")]
		 private var SplashImage320:Class; 
		 
		 public function MultiDPISplashScreen() 
		 { 
			 super(); 
		 } 
		 
		 override mx_internal function getImageClass(dpi:Number, aspectRatio:String):Class 
		 { 
			 if (dpi == DPIClassification.DPI_160) 
				 return SplashImage160; 
			 else if (dpi == DPIClassification.DPI_240) 
				 return SplashImage240; 
			 else if (dpi == DPIClassification.DPI_320) 
				 return SplashImage320; return null; 
		 } 
	 } 
}